import java.util.Scanner;

public class Main2{
    public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        double c = in.nextDouble();
        double f = in.nextDouble();
        TemperatureConverter tempConverter = new TemperatureConverter();
        double  fFromC = tempConverter.celsiusToFahrenheit(c);
        double cFromF = tempConverter.fahrenheitToCelsius(f);
        System.out.printf("%.2f, %.2f", fFromC, cFromF);
    }
}
class TemperatureConverter {
    public double celsiusToFahrenheit(double c){
        return (9.0/5.0)*c+32;
    }
    public double fahrenheitToCelsius(double f){
        return 5.0*(f-32)/9.0;
    }
}


/* 请在这里填写答案 */
